import React, { Component } from 'react'
import { Card } from 'antd-mobile'
import { getSearchParams } from '../../utils/param'

import './index.css'

export default class index extends Component {
    constructor(props) {
        super(props)
        this.state = {
            path: '',
        }
    }
    componentDidMount() {
        document.title = '问卷调查'

        let searchParams = getSearchParams(this.props.location.search)
        this.setState({
            path: searchParams.path
        })
    }
    toNext() {
        this.props.history.push('/' + this.state.path)
    }
    render() {
        return (
            <div className="guide-class" onClick={() => { this.toNext() }}>
                <Card className="card">
                    {this.state.path === 'questComp' ? '请放心反馈就诊过程中所遇到的问题，我们将全程为您保密，您的宝贵意见将是我们前行的动力！' : ''}
                    {this.state.path === 'questUser' ? '我们诚挚地邀请您参与我院的患者满意度调查，希望您能给予最真实的评价，与我们携手共建更好的同仁！' : ''}
                </Card>
                <div className="renwu"></div>
                <div className="skip"></div>
            </div>
        )
    }
}
